package thread;

public class ThreadDemo {
    public static void main(String[] args) {
        Thread m1 = new MyThread1();
        Thread m2 = new MyThread2();
        m1.start();
        m2.start();
    }
}
class MyThread1 extends Thread{
    public void run(){
        for (int i=0;i<1000;i++){
            System.out.println("------");
        }
    }
}

class MyThread2 extends Thread{
    public void run(){
        for (int i=0;i<1000;i++){
            System.out.println("+++++") ;
        }
    }
}

